package com.athena.job.service;

import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Arrays;

/**
 * asset_debt 数据从 mysql 同步到clickhouse
 * <p>
 * 开发步骤：
 *
 * @author xuxueli 2023-12-28 20:52:51
 */
@Slf4j
@Service
public class AssetDebtMySqlToClickhouseService {


    /**
     * 1、assetdebt数据同步（Bean模式）
     */
    @XxlJob("assetDebtMySqlToClickhouseJobHandler")
    public void assetDebtMySqlToClickhouseJobHandler() throws Exception {
        XxlJobHelper.log("XXL-JOB, Hello World.");

        for (int i = 0; i < 5; i++) {
            XxlJobHelper.log("beat at:" + i);
        }
        log.info("数据同步任务执行完毕........................................");
        // default success
    }
}
